# _*_ coding:utf-8 _*_
from django.conf.urls import url, include

from auser.views import user_login, user_register, registerVerify, user_logout,change_avatar
from auser.views import Homepage, user_info_amend, confirm, changepwd, changeEmail,amend_avatar
urlpatterns = [
	url('^logout/$', user_logout, name='logout'),
	url('^login/$', user_login, name='login'),
	url('^register/$', user_register, name='register'),
	url('^registerVerify/$', registerVerify, name='registerVerify'),
	url('^confirm/(?P<id>\d+)/(?P<token>[\s\S]*)/$', confirm, name="confirm"),
	url('^homepage/(?P<pk>[0-9]+)/$', Homepage.as_view(), name='homepage'),
	url('^homepage/(?P<pk>[0-9]+)/amend/$', user_info_amend, name='user_info_amend'),
	url(r'^change_avatar/(?P<pk>[0-9]+)/', include([
		url(r'^replace/$',change_avatar, name='replace_avatar'),
		url('^$',change_avatar, name="change_avatar"),
		url('^amend/$',amend_avatar,name='amend_avatar')
	])),
	url('^changepwd/(?P<pk>[0-9]+)/$', changepwd, name='changepwd'),
	url('^change/(?P<pk>[0-9]+)/', include([
		url(r'^email/$', changeEmail, name='changeemail'), ]))
]
